package com.lonewalker.sparrow.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lonewalker.sparrow.entity.SysUser;
import com.lonewalker.sparrow.req.UserQueryReq;
import com.lonewalker.sparrow.vo.SysUserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户信息表 映射层。
 *
 * @author lonewalker
 * @since 1.0
 */
public interface UserMapper extends BaseMapper<SysUser> {
    /**
     * 查询所有有效的用户数据
     *
     * @return SysUserVo
     */
    List<SysUserVo> listUser();

    /**
     * 分页查询用户数据
     *
     * @param page         分页信息
     * @param requestParam 查询参数
     * @return SysUserVo
     */
    Page<SysUserVo> pageUser(Page<SysUserVo> page, @Param("requestParam") UserQueryReq requestParam);
}
